<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <style type="text/css">
            body, html, #allmap {
                width: 100%;
                height: 100%;
                overflow: hidden;
                margin: 0;
                font-family: "微软雅黑";
            }
        </style>
        <script type="text/javascript" src="../../js/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=kaLBv8Axey6j0ZRMAHaYUhGAKVq4KG9K"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                lon = 116.363737;
                lat = 39.913607;

                // 百度地图API功能
                var map = new BMap.Map("allmap");
                map.centerAndZoom(new BMap.Point(116.404, 39.915), 7);
                map.enableScrollWheelZoom(true);
                map.addControl(new BMap.NavigationControl());
                map.addControl(new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT}));
                map.addControl(new BMap.OverviewMapControl());
                map.addControl(new BMap.MapTypeControl());
                
               
                var pt = new BMap.Point(lon, lat);
                var myIcon = new BMap.Icon("truck.png", new BMap.Size(300, 157));
                var marker2 = new BMap.Marker(pt, {icon: myIcon});  // 创建标注
                map.addOverlay(marker2);  // 将标注添加到地图中
                
                lon = 116.365737;
                lat = 39.536607;
                pt = new BMap.Point(lon, lat);                
                marker2 = new BMap.Marker(pt, {icon: myIcon});  // 创建标注
                map.addOverlay(marker2);  // 将标注添加到地图中
                
                lon = 116.485737;
                lat = 39.996607;
                pt = new BMap.Point(lon, lat);                
                marker2 = new BMap.Marker(pt, {icon: myIcon});  // 创建标注
                map.addOverlay(marker2);  // 将标注添加到地图中
            });
        </script>
    </head>
    <body>
        <div id="allmap"></div>
    </body>
</html>
